<?php
	//
	/****************** START FUNCTION STYLE *********************/
	 function rex_for_function_line(){
		return "/".'^[\s]*[\w_][\w\d_]*\s*.*\s*[\w_][\w\d_]*\s*\(.*\)\s*{$'."/";
	}
	/****************** END FUNCTION STYLE ***********************/

	 function rex_for_keywords(){
		return "/"."^[\s]*[a-zA-Z_$][a-zA-Z0-9_$]*"."/";
	}
	
	function rex_for_calculations(){
		return "/"."\s*(\=|\+|-|\*|\\|->|\(|\)|\[|\])\s*"."/";
	}
		
	function rex_for_format_specifiers(){
		return "/"."%\s*(.*?)\s*(i|d|s|c|f)"."/";
	}	
	
	/****************** START INCLUDE STYLE *********************/
	 function rex_for_include(){
		return "/".'^\s*#\s*include\s*([<"])([^>"]*)[>"].*$'."/";
	}
	
	function rex_for_header(){
		return "/".'^\s*#\s*'."/";
	}
	
	/****************** END INCLUDE STYLE ***********************/
	
	 function rex_for_class(){
		return "/"."\b(class|struct)\b"."/";
	}
	
	 function rex_for_properties(){
		return "/"."\s*(|protected|private):"."/";
	}
	
	 function rex_for_close_brace(){
		return "/"."\s*}\s*$"."/";
	}
	
	 function rex_for_open_brace(){
		return "/"."\s*{\s*$"."/";
	}

	/****************** START COMMENT STYLE *********************/
	 function rex_for_comment_single_line(){
		return "/"."^[\s]*//"."/";
	}

	 function rex_for_comment_star(){
		return "~"."/\*.*\*/"."~";;
	}	

	/****************** START COMMAND *********************/
	 function rex_for_if_command(){
		return "/"."\bif\s*\((.*)\)\s*{"."/";
	}

	function rex_for_else_command(){
		return "/"."\belse\s*\((.*)\)\s*{"."/";
	}
	
	 function rex_for_while_command(){
		return "/"."\bwhile\s*\((.*)\)\s*{"."/";
	}

	 function rex_for_for_command(){
		return "/"."\bfor\s*\((.*)\)\s*{"."/";
	}

	 function rex_for_switch_command(){
		return "/"."\bswitch\s*\((.*)\)\s*{"."/";
	}	 

	/****************** START FILE *********************/
	function rex_for_init_file(){
		return "/".'FILE\s\*\s*(.*?)\s*;'."/";
	}
	
	function rex_for_open_file(){
		return "/".'\s*(.*?)\s*\= fopen\((.*?),(.*?)\);\s*'."/";
	}	
	
	function rex_for_close_file(){
		return "/".'fclose\(\s*(.*?)\s*\)\s*;'."/";
	}
	
	function rex_for_write_file(){
		return "/".'(fprintf|fputs|fputc)\(\s*(.*?)\s*,\s*(.*?)\s*\)\s*;'."/";
	}	
	
	function rex_for_read_file(){
		return "/".'(fscanf|fgets)\(\s*(.*?)\s*,\s*(.*?)\s*,\s*(.*?)\s*\)\s*;'."/";}
	
	function rex_for_behind_parentheses(){
		return "/".'\s*\(\s*(.*?)\,\s*(.*?)\s*\)\s*'."/";
	}
	
	/****************** START INPUT-OUTPUT *********************/
	function rex_for_is_IO(){
		return "/".'\b(printf|scanf|puts|gets)\s*\(\s*(.*?)\s*\)\s*;'."/";
	}
	
	function rex_for_printf(){
		return "/".'printf\s*\(\s*(.*?)\s*\)\s*;'."/";
	}
	
	function rex_for_scanf(){
		return "/".'scanf\s*\(\s*(.*?)\s*\)\s*;'."/";
	}
	
	function rex_for_gets_puts(){
		return "/".'(puts|gets)\s*\(\s*(.*?)\s*\)\s*;'."/";
	}
	
	function rex_for_behind_IO_type_1(){
		return '/'.'\s*\(\s*"(.*?)\",\s*(.*?)\s*\)\s*;'.'/';
	}
	
	function rex_for_behind_printf_type_2(){
		return '/'.'\s*\(\s*"(.*?)\"\s*\)\s*;'.'/';
	}
		
	/****************** START ASSIGN *********************/
	function rex_for_assign(){
		return '/'.'\s*(.*?)\s*\=\s*(.*?);\s*'.'/';
	}
	
	/****************** START CHECK *********************/
	function rex_for_check_comma(){
		return "/".'\b(#|for|do|while|switch|if|else)\b'."/";
	}
	
	function rex_for_check_function(){
		return "/".'\s*(int|void|long|float|double|char|short|main)\s(.*?)\s*\((.*?)\)\s*'."/";
	}